clc;
clear;
f=@(x,y)exp(-x.^2/2).*sin(x.^2+y);
fh=@(x)sqrt(1-x.^2/2);
fl=@(x)-sqrt(1-x.^2/2);
[x,y,z]=intfunc2(f,-1/2,1,-1.2,1,2);

for i=1:length(x),
    x0=x(i);
    xx=sort([fl(x0),fh(x0)]);
    s=find(y>xx(2)|y<xx(1));
    z(s,1)=NaN;
end


surf(x,y,z),
figure(),
surf(x,y,z),
view(0,90)% 转换了视角